<div class="header_menu">
    <div class="container">
        <div class="header-nav clearfix">
            <?php echo $this->partial('shop/layout/headerMenu'); ?>
        </div>
    </div>
</div>
</div>
<div class="container breadcrumbs">
    <a href="<?php echo $this->url('shop'); ?>"><?php echo $this->translate('首页'); ?></a>
    <span class="sep">/</span><span><?php echo $this->translate('用户中心'); ?></span>
</div>

<div class="container">
    <div class="uc-full-box">
        <div class="row">
            <div class="span4">
                <?php echo $this->partial('shop/partial/home/leftMenu'); ?>
            </div>

            <div class="span16">
                <div class="xm-box uc-box">
                    <div class="xm-line-box uc-info-box">
                        <div class="box-bd clearfix">
                            <img src="<?php echo $this->shopHelper()->userAvatarImagePath($this->userInfo->getUserAvatar()); ?>" class="uc-avatar" style="border:1px solid #D7D7D7;">
                            <div class="uc-info">
                                <h3 class="uc-welcome"><span class="user-name"><a href="<?php echo $this->url('home-user'); ?>"><?php echo $this->shopHelper()->getUserLoginData('user_name'); ?></a></span></h3>
                                <div class="uc-info-detail">
                                    <div class="info-notice">
                                        <?php if (isset($this->showData['userBuyGroupInfo'])) { ?>
                                            <?php if ($this->showData['userBuyGroupInfo']['groupIcon']) { ?>
                                                <img src="<?php echo $this->basePath($this->showData['userBuyGroupInfo']['groupIcon']); ?>">
                                            <?php } ?>
                                            <?php echo $this->showData['userBuyGroupInfo']['payUserGroupName']; ?>
                                        <?php } else { ?>
                                            <?php echo $this->shopHelper()->getUserLoginData('user_group_name'); ?>
                                        <?php } ?>
                                        <span class="sep">|</span>
                                        <?php echo $this->translate('账户余额'); ?>：<?php echo $this->frontCurrency($this->userInfo->getUserMoney()); ?>
                                        <span class="sep">|</span>
                                        <?php echo $this->translate('消费积分'); ?>：<?php echo $this->userInfo->getIntegralType1Num(); ?>
                                        <span class="sep">|</span>
                                        <?php echo $this->translate('等级积分'); ?>：<?php echo $this->userInfo->getIntegralType2Num(); ?>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <?php
                $orderList = $this->shopHelper()->shopOrderListNum(8);
                if ($orderList) {
                    ?>
                    <div class="uc-box">
                        <div class="uc-order-list-box">
                            <ul class="uc-order-detail-list">
                                <?php
                                foreach ($orderList as $orderValue) {
                                    ?>
                                    <li class="uc-order-detail-item">
                                        <table class="order-detail-table">
                                            <thead>
                                            <tr>
                                                <th colspan="3" class="column-info column-t">
                                                    <div class="column-content">
                                                        <span class="order-status"><?php echo $this->shopHelper()->getOrderStatus($orderValue->getOrderStatus()); ?></span>
                                                        <?php echo $this->translate('订单编号'); ?>：<a href="<?php echo $this->url('home-order', ['action' => 'orderInfo', 'id' => $orderValue->getOrderId()]); ?>"><?php echo $orderValue->getOrderSn(); ?></a>
                                                        <span class="sep">|</span>
                                                        <?php echo $this->escapeHtml($orderValue->getUserName()); ?>
                                                        <span class="sep">|</span>
                                                        <?php echo $this->shopDateFormat()->shopOrderAddTime($orderValue->getOrderAddTime()); ?>
                                                    </div>
                                                </th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                            <tr>
                                                <td class="column-detail column-l">
                                                    <ul class="order-goods-list">
                                                        <?php
                                                        foreach($orderValue->getOrderGoods() as $goodsKey => $goodsValue) {
                                                            $goodsName = $this->escapeHtml($goodsValue->getGoodsName());
                                                            ?>
                                                            <li <?php if($goodsKey == 0) echo 'class="first"'; ?>>
                                                                <a href="<?php echo $this->url('shop-goods', ['id' => $goodsValue->getGoodsId()]); ?>" target="_blank">
                                                                    <img alt="<?php echo $goodsName; ?>" title="<?php echo $goodsName; ?>" src="<?php echo $this->shopHelper()->baseGoodsImagePath($goodsValue->getGoodsImage()); ?>" class="goods-thumb">
                                                                </a>
                                                                <a class="goods-name" href="<?php echo $this->url('shop-goods', ['id' => $goodsValue->getGoodsId()]); ?>" target="_blank"><?php echo $goodsName; ?></a>
                                                                <span class="goods-price"><?php echo $this->shopHelper()->orderCurrency($goodsValue->getGoodsPrice(), $orderValue->getCurrencySymbol()); ?> x <?php echo $goodsValue->getBuyNum(); ?></span>
                                                                <span><?php echo $this->escapeHtml($goodsValue->getInSpecGoodsStr()); ?></span>
                                                            </li>
                                                        <?php } ?>
                                                    </ul>
                                                </td>
                                                <td class="column-price">
                                                    <div class="order-info order-price"><?php echo $this->shopHelper()->orderCurrency($orderValue->getOrderAmount(), $orderValue->getCurrencySymbol()); ?></div>
                                                </td>
                                                <td class="column-action column-r">
                                                    <div class="order-info order-action">
                                                        <a href="<?php echo $this->url('home-order', ['action' => 'orderInfo', 'id' => $orderValue->getOrderId()]); ?>"><?php echo $this->translate('订单详情'); ?><i class="iconfont"></i></a>
                                                    </div>
                                                </td>
                                            </tr>
                                            </tbody>
                                        </table>
                                    </li>
                                <?php } ?>
                            </ul>
                        </div>
                    </div>
                <?php } ?>
            </div>
        </div>

    </div>

</div>